package LuoGu.暴力.三连击;

import java.util.Scanner;

public class Main {
    public static void main(String [] args){
        Scanner s = new Scanner(System.in);
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int index = 0;
        int [] temp = new int [10];
        for(int i=1;i<=1000/c;i++){
            int l = 1;
            //以下已经保证成比例。无需再判断
            int a1 = i*a;
            int b1 = i*b;
            int c1 = i*c;
            int a2 = a1;
            int b2 = b1;
            int c2 = c1;
            if(a1>=999||b1>=999||c1>=999) break;
            for(int j=0;j<3;j++){
                temp[a2%10]++;
                a2/=10;
            }
            for(int j=0;j<3;j++){
                temp[b2%10]++;
                b2/=10;
            }
            for(int j=0;j<3;j++){
                temp[c2%10]++;
                c2/=10;
            }
            for(int j=1;j<10;j++){
                if(temp[j]!=1){
                    l=0;
                    break;
                }
            }
            for(int j=1;j<10;j++){
                temp[j] = 0;
            }
            if(l==1){
                index++;
                System.out.println(a1+" "+b1+" "+c1);
            }
        }if(index==0) System.out.print("No!!!");
    }
}
